package com.ruoyi.campus.service.impl;

import com.ruoyi.campus.domain.Distribution;
import com.ruoyi.campus.domain.vo.DistributionVO;
import com.ruoyi.campus.mapper.DistributionMapper;
import com.ruoyi.campus.service.IDistributionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 校区分销商品审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-10
 */
@Service
public class DistributionServiceImpl implements IDistributionService 
{
    @Autowired
    private DistributionMapper distributionMapper;

    /**
     * 查询校区分销商品审核
     * 
     * @param distriId 校区分销商品审核主键
     * @return 校区分销商品审核
     */
    @Override
    public Distribution selectDistributionByDistriId(Integer distriId)
    {
        return distributionMapper.selectDistributionByDistriId(distriId);
    }

    /**
     * 查询校区分销商品审核列表
     * 
     * @param distributionvo 校区分销商品审核
     * @return 校区分销商品审核
     */
    @Override
    public List<DistributionVO> selectDistributionList(DistributionVO distributionvo)
    {
        return distributionMapper.selectDistributionList(distributionvo);
    }



    // /**
    //  * 查询校区分销商品审核列表
    //  *
    //  * @param distribution 校区分销商品审核
    //  * @return 校区分销商品审核
    //  */
    // @Override
    // public List<Distribution> selectDistributionList(Distribution distribution)
    // {
    //     return distributionMapper.selectDistributionList(distribution);
    // }


    /**
     * 新增校区分销商品审核
     * 
     * @param distribution 校区分销商品审核
     * @return 结果
     */
    @Override
    public int insertDistribution(Distribution distribution)
    {
        return distributionMapper.insertDistribution(distribution);
    }

    /**
     * 修改校区分销商品审核
     * 
     * @param distribution 校区分销商品审核
     * @return 结果
     */
    @Override
    public int updateDistribution(Distribution distribution)
    {
        return distributionMapper.updateDistribution(distribution);
    }

    /**
     * 批量删除校区分销商品审核
     * 
     * @param distriIds 需要删除的校区分销商品审核主键
     * @return 结果
     */
    @Override
    public int deleteDistributionByDistriIds(Integer[] distriIds)
    {
        return distributionMapper.deleteDistributionByDistriIds(distriIds);
    }

    /**
     * 删除校区分销商品审核信息
     * 
     * @param distriId 校区分销商品审核主键
     * @return 结果
     */
    @Override
    public int deleteDistributionByDistriId(Integer distriId)
    {
        return distributionMapper.deleteDistributionByDistriId(distriId);
    }
}
